﻿#region 版权说明
/**********************************************************************
      * 功能说明:
      * 
      * CLR 版本:       4.0.30319.18033
      * 类 名 称:       CommonHelper
      * 命名空间:       Logistics.Helper
      * 创建时间:       2013-05-09 09:35:19
      * 作    者:       Devil月哥
      * 版    权:       CommonHelper说明：本代码版权归Devil月哥所有 All Rights Reserved (C) 2013 - 2013
      * 网    站:       http://www.xd5u.com
      * 邮    箱:       webmaster@xd5u.com
      * 唯一标识：      f7a20e47-34c3-4c28-a335-fb75329e13c8  

      * 修改时间:
      * 修 改 人:
      * 
      ***********************************************************************/
#endregion

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Logistics.Helper
{
    public class CommonHelper
    {
        #region 分页获取快递信息列表
        /// <summary>
        /// 分页获取快递信息列表
        /// </summary>
        /// <param name="startRowIndexId"></param>
        /// <param name="maxNumberRows"></param>
        /// <param name="Total"></param>
        /// <returns></returns>
        public static IList<Model.Model_Xd5u_Express_Info> GetExpress_InfoList(int startRowIndexId, int maxNumberRows, out int Total)
        {
            object[] obs = new object[] { startRowIndexId, maxNumberRows };
            string xml = Devil_System.Helper.WebServicesHelper.WebServicesDynamic
                (
                 WebServices.WebServicesExpress.WSUrlEnum.ExpressUrl,
                 WebServices.WebServicesExpress.WSClassNameEnum.ExpressService,
                 WebServices.WebServicesExpress.WSMethodNameEnum.GetExpress_InfoList, obs
                ).ToString();

            object[] obsTotal = null;
            int _Total =
                System.Convert.ToInt32
                (
                Devil_System.Helper.WebServicesHelper.WebServicesDynamic
                (
                WebServices.WebServicesExpress.WSUrlEnum.ExpressUrl,
                WebServices.WebServicesExpress.WSClassNameEnum.ExpressService,
                WebServices.WebServicesExpress.WSMethodNameEnum.GetExpress_InfoTotal, obsTotal
                )
                );

            Total = _Total;

            List<Model.Model_Xd5u_Express_Info> list2 =
                Devil_System.Helper.XmlUtil.Deserialize(typeof(List<Model.Model_Xd5u_Express_Info>), xml)
                as List<Model.Model_Xd5u_Express_Info>;

            return list2;
        }

        /// <summary>
        /// 分页获取快递信息列表
        /// </summary>
        /// <param name="startRowIndexId"></param>
        /// <param name="maxNumberRows"></param>
        /// <returns></returns>
        public static IList<Model.Model_Xd5u_Express_Info> GetExpress_InfoList(int startRowIndexId, int maxNumberRows)
        {
            object[] obs = new object[] { startRowIndexId, maxNumberRows };
            string xml =
                Devil_System.Helper.WebServicesHelper.WebServicesDynamic
                (
                WebServices.WebServicesExpress.WSUrlEnum.ExpressUrl,
                WebServices.WebServicesExpress.WSClassNameEnum.ExpressService,
                WebServices.WebServicesExpress.WSMethodNameEnum.GetExpress_InfoList, obs
                ).ToString();

            List<Model.Model_Xd5u_Express_Info> list2 =
                Devil_System.Helper.XmlUtil.Deserialize(typeof(List<Model.Model_Xd5u_Express_Info>), xml)
                as List<Model.Model_Xd5u_Express_Info>;

            return list2;
        }
        #endregion

        #region 获取快递信息总数
        /// <summary>
        /// 获取快递信息总数
        /// </summary>
        /// <returns></returns>
        public int GetExpress_InfoTotal()
        {
            object[] obsTotal = null;
            int _Total =
                System.Convert.ToInt32
                (
                Devil_System.Helper.WebServicesHelper.WebServicesDynamic
                (
                WebServices.WebServicesExpress.WSUrlEnum.ExpressUrl,
                WebServices.WebServicesExpress.WSClassNameEnum.ExpressService,
                WebServices.WebServicesExpress.WSMethodNameEnum.GetExpress_InfoTotal, obsTotal
                )
                );

            return _Total;
        }
        #endregion
    }
}
